<?php
function quickSearchTags()
{
    global $sql;

    $sql->connect();
    $sql->query("SELECT dName, cityName FROM 3i_bp_district, 3i_cities WHERE cityid='1'");
    $capital = $sql->query;
    $sql->query("SELECT cityName FROM 3i_cities WHERE cityid > '1'");
    $cities = $sql->query;
    $sql->kill();
    
    $retval = "";
    
    while ($item = mysql_fetch_array($capital)) {
        $retval .= "\"" .  $item['cityName'] . " - " . $item['dName'] . ".\",";
    }
    
    $citiesRouwCount = mysql_num_rows($cities);
    $i = 0;
    
    while ($itemCities = mysql_fetch_array($cities)) {
        $i++;
        if ($i == $citiesRouwCount) {
            $eol = "";
        } else {
            $eol = ",";
        }
        $retval .= "\"" .  $itemCities['cityName'] . "\"" . $eol;
    }
    
    echo $retval;
}
function quickSearch()
{
    global $sql;

    $sql->connect();
    $sql->query("SELECT * FROM 3i_rest_types ORDER BY rTypeID ASC");
    $restTypes = $sql->query;
    $sql->kill();
?>
       <div id="quickSearch">
            <select name="buyOrRent" tabindex="1">
                <option value="1">Eladó</option>
                <option value="2">Kiadó</option>
            </select>
            &nbsp;
            <select name="restType" tabindex="2">
                <?php
    while ($item = mysql_fetch_array($restTypes)) {
        echo "<option value=\"" . $item['rTypeID'] . "\">" . $item['qsName'] .
            "</option>";
    }
?>
            </select>&nbsp;keresek
            &nbsp;<input type="text" name="cityDist" id="cityDist" size="40" tabindex="3" />,&nbsp;
            <input type="text" name="price1" id="cityDist" size="3" tabindex="4" />&nbsp;-&nbsp;<input type="text" name="price2" id="cityDist" size="3" tabindex="5" />&nbsp;mFt között&nbsp;
            <input type="submit" value="Keresek" name="searchSubmit" tabindex="6" />
       </div>
       <?php
}
?>